.section .data
input_a:
    .word -2
    .word -1
    .word 0
    .word 1
    .word 2
    .word 3
    .word -5
    .word 4
    .word -1
    .word 6
input_b:
    .word 1
    .word 2
    .word 3
    .word 4
    .word 5
    .word 6
    .word 7
    .word 8
    .word 9
    .word 10
output:
    .space 40

.section .text
.globl _start

_start:
    # 条件向量加法: 只有当a[i] >= 0时，才计算result[i] = a[i] + b[i]
    la x8, input_a
    la x9, input_b
    la x18, output
    li x6, 10
    li x5, 0
loop_start_1:
    slli x7, x5, 2
    add x29, x8, x7
    lw x28, 0(x29)
    blt x28, zero, if_else_3
    add x29, x9, x7
    lw x30, 0(x29)
    add x28, x28, x30
    add x29, x18, x7
    sw x28, 0(x29)
    j if_end_4
if_else_3:
    add x29, x18, x7
    sw zero, 0(x29)
if_end_4:
    addi x5, x5, 1
    blt x5, x6, loop_start_1
loop_end_2:
    li a0, 0
    li a7, 93
    ecall